
package com.zsrt.day0523.jdbc;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.util.Properties;
import java.util.ResourceBundle;



public class sql01 {

	public static void main(String[] args)throws Exception {
		
		
		Properties prop = new Properties(); 
		FileInputStream in = new FileInputStream("resources/jdbc.properties");
		prop.load(in);
		
	   
		String className = prop.getProperty("jdbc.driver"); 
		
		Class.forName(className);
		
		String url = prop.getProperty("jdbc.url");
		String user=prop.getProperty("jdbc.user");
		String password=prop.getProperty("jdbc.password");
		Connection connection = DriverManager.getConnection(url, user, password);
		
		Statement statement = connection.createStatement();
		String sql="insert into employee values(7151,22,7000,'jmj')";
		int i = statement.executeUpdate(sql);
		System.err.println(i);
		
	}
}
